package jym.tan.tmdb.bean;

import java.io.Serializable;

import com.google.gson.annotations.SerializedName;

/**
 * The Class BaseBean. Base class of all TMDB Json objects.
 * <p>
 * 	The properties are:
 * 	<ul>
 * 		<li>id</li>
 * 		<li>iso_3166_1</li>
 * 		<li>iso_639_1</li>
 * 	</ul>
 * </p>	
 * @author Tanmoy
 */
public abstract class BaseBean implements Serializable {

	private static final long serialVersionUID = 469456121188338347L;

	@SerializedName("id")
	protected int id;

	@SerializedName("iso_3166_1")
	protected String iso_3166_1;
	
	@SerializedName("iso_639_1")
	protected String iso_639_1;
	
	/**
	 * Default Constructor.
	 */
	public BaseBean() {
		
	}
	
	/**
	 * Gets the id.
	 *
	 * @return 
	 * 		The id
	 */
	public int getId() {
		return id;
	}
	
	/**
	 * Sets the id.
	 *
	 * @param id 
	 * 		The new id
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * Gets the iso_3166_1.
	 *
	 * @return 
	 * 		The iso_3166_1
	 */
	public String getIso_3166_1() {
		return iso_3166_1;
	}

	/**
	 * Sets the iso_3166_1.
	 *
	 * @param iso_3166_1 
	 * 		The new iso_3166_1
	 */
	public void setIso_3166_1(String iso_3166_1) {
		this.iso_3166_1 = iso_3166_1;
	}

	/**
	 * Gets the iso_639_1.
	 *
	 * @return 
	 * 		The iso_639_1
	 */
	public String getIso_639_1() {
		return iso_639_1;
	}

	/**
	 * Sets the iso_639_1.
	 *
	 * @param iso_639_1 
	 * 		The new iso_639_1
	 */
	public void setIso_639_1(String iso_639_1) {
		this.iso_639_1 = iso_639_1;
	}	
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {		
		StringBuilder builder = new StringBuilder();
		builder.append("{").
			append("id:").append(id).
			append(",").
			append("iso_3166_1:").append("\"").append(iso_3166_1).append("\"").
			append(",").
			append("iso_639_1:").append("\"").append(iso_639_1).append("\"").
			append("}");
		return builder.toString();
	}
}
